clear;
addpath("函数\");
img = imread("./原图像/lena_std.tif");
I_R = img(:,:,1);
I_G = img(:,:,2);
I_B = img(:,:,3);
%Logistic混沌处理
I_R = Logistic(I_R);
I_G = Logistic(I_G);
I_B = Logistic(I_B);
I(:,:,1) = I_R;
I(:,:,2) = I_G;
I(:,:,3) = I_B;
subplot(1,2,1);
imshow(I);
title('混沌映射后图像');
%加密
E(:,:,1) = encryption(I_R);
E(:,:,2) = encryption(I_G);
E(:,:,3) = encryption(I_B);
subplot(1,2,2);
imshow(E);
title("插值后图像");
imwrite(E,"./加密图像/RGB图像加密.bmp")